<template>
	<div class="app-container">
		<div class="title">基础用法</div>
		<el-popover placement="top-start" title="标题" width="200" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
			<el-button slot="reference">hover 激活</el-button>
		</el-popover>

		<el-popover placement="bottom" title="标题" width="200" trigger="click" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
			<el-button slot="reference">click 激活</el-button>
		</el-popover>

		<el-popover ref="popover" placement="right" title="标题" width="200" trigger="focus" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
		</el-popover>
		<el-button v-popover:popover>focus 激活</el-button>

		<el-popover placement="bottom" title="标题" width="200" trigger="manual" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。" v-model="visible">
			<el-button slot="reference" @click="visible = !visible">手动激活</el-button>
		</el-popover>
		<div class="title">嵌套信息</div>
		<el-popover placement="right" width="400" trigger="click">
			<el-table :data="gridData">
				<el-table-column width="150" property="date" label="日期"></el-table-column>
				<el-table-column width="100" property="name" label="姓名"></el-table-column>
				<el-table-column width="300" property="address" label="地址"></el-table-column>
			</el-table>
			<el-button slot="reference">click 激活</el-button>
		</el-popover>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				visible: false,
				gridData: [{
					date: '2016-05-02',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1518 弄'
				}, {
					date: '2016-05-04',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1518 弄'
				}, {
					date: '2016-05-01',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1518 弄'
				}, {
					date: '2016-05-03',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1518 弄'
				}]
			}
		}
	}
</script>

<style lang="scss">
	.app-container {
		.title {
			margin-top: 30px;
			margin-bottom: 10px;
		}
	}
</style>